<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8" import="java.util.*"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ request.getContextPath() + "/";
//response.sendRedirect("common/login");
%>
<c:set var="path" value="${pageContext.request.contextPath }" />
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>用户管理</title>
			<script type="text/javascript" src="${path }/resource/js/jquery-2.0.3.js"></script>
			<script type="text/javascript" src="${path }/resource/layer/layer.js"></script>
			<script type="text/javascript" src="${path }/resource/js/mytools.js"></script>
		<link rel="stylesheet" href="${path }/resource/bootstrap/css/bootstrap.min.css" />
		<link rel="stylesheet" href="${path }/resource/bootstrap/css/bootstrap-responsive.min.css" />
	</head>
	<body>
		
<form class="form-horizontal"  onsubmit="javascripr:return false;" id="from1" >
      <div class="control-group">
      <input type="hidden" name="userId" value="${obj.userId}"/> <!--隐藏id el表达式获取 -->
        <label class="control-label" for="inputEmail">账号:</label>
        <div class="controls">
         <input  type="text"  name="userAccount" value="${obj.userAccount}" /> 
        </div>
         <label class="control-label" for="inputEmail">密码:</label>
        <div class="controls">
        	<input type="password" name="userPass" value="123" value="${obj.userPass}"/> 
        </div>
         <label class="control-label" for="inputEmail">用户名:</label>
        <div class="controls">
        	 <input type="text" name="userName" value="${obj.userName}" /> <br>
        </div>
      </div>
      <div class="control-group">
        <div class="controls">
		<input type="button" value="保存" class="btn" onclick="save()">
		<input type="reset"  class="btn" value="重置">
        </div>
      </div>
    </form>
		
		<script type="text/javascript">
		
		function save(){
		mytooljs.initForm({
			idSelecter :"#from1", //表单id选择器
			sendurl:"${path }/developer/user/addOrModify",//发送请求的地址
			afterload:function(){//请求成功后回调
				alert("保存成功");
				parent.mjs.search();
				parent.layer.closeAll();
			}
		});
		}
		
		
		</script>
	</body>
</html>
